<template>
  <div>
    名字是{{ useStore.user.name }}
    年龄是{{ useStore.user.age }}
    <el-button type="primary" @click="changeName">
      修改名字
    </el-button>
  </div>
</template>
<script setup>
import { useUserStore } from "@/stores/user";
const useStore = useUserStore();
function changeName() {
  console.log(useStore);
  useStore.updateName('BOb')
}
</script>